<?php 
include ("conn.php");
include ("util.php");
include ("pubf.php");

if (! is_login())
    die ( err_msg ('请先登录!') );

// 用户名
$user = get_header('user');

if (! $user) 
    die (err_msg('帐号不能为空'));

$sql = "select * from user,person_info where name='$user' and user.uid=person_info.uid";
$row = has_one ($sql);
if (! $row )
    die (err_msg('没有该用户'));

$info = array ('name'=>$row['name'], 'nickname'=> $row['nickname'], 'description'=> $row['description'], 
    'sex'=> $row['sex'],'id'=> $row['uid'] );

echo suc_msg(json_encode($info));

?>


